package VN.EDU.IMIC.DEVELOPER.TRINHCAOSANG.Exam01.Bai1.Bai2;

/**
 * Created by Sang on 07/03/2016.
 */
public class ViewsApplication {

    public static void main(String[] args) {
        StudentEntity studentEntity1 = new StudentEntity();

        studentEntity1.setFullName("Nguyen Van A");
        studentEntity1.setRollNo(1);
        studentEntity1.setSex(true);
        studentEntity1.setEmail("nvA@gmail.com");
        studentEntity1.setMobiles("0189898989");
        studentEntity1.setAddress("80 Nguyen Du , Hoan Kiem");
        studentEntity1.setMark(7.8);


        StudentEntity studentEntity2 = new StudentEntity();
        studentEntity2.setRollNo(2);
        studentEntity2.setFullName("Nguyen Dinh B");
        studentEntity2.setEmail("nvss3B@gmail.com");
        studentEntity2.setSex(true);
        studentEntity2.setAddress("20 Tran hung Dao , Hoan Kiem");
        studentEntity2.setMobiles("088923742");
        studentEntity2.setMark(7.8);

        StudentEntity studentEntity3 = new StudentEntity();
        studentEntity3.setRollNo(3);
        studentEntity3.setFullName("Le thi T");
        studentEntity3.setEmail("TTTas@gmail.com");
        studentEntity3.setSex(false);
        studentEntity3.setAddress("33 Lang , Dong Da");
        studentEntity3.setMobiles("0994445334");
        studentEntity3.setMark(3.5);

        StudenController studenController1 = new StudenController(studentEntity1);
        StudenController studenController2 = new StudenController(studentEntity2);
        StudenController studenController3 = new StudenController(studentEntity3);

        System.out.println(" Student 1 info : \t " + studenController1.PrintStudentInfo(studentEntity1));
        System.out.println("Student's 1 Mark : \t " + studenController1.CheckMark(studentEntity1));

        System.out.println(" Student 2 info : \t " + studenController2.PrintStudentInfo(studentEntity2));
        System.out.println("Student's 2 Mark : \t " + studenController2.CheckMark(studentEntity2));

        System.out.println(" Student 3 info : \t " + studenController3.PrintStudentInfo(studentEntity3));
        System.out.println("Student's 3 Mark : \t " + studenController3.CheckMark(studentEntity3));

        System.out.println("Compare Student 1 vs Studen 2 : \t " + studenController1.CompareTo(studentEntity1, studentEntity2));

        System.out.println("Compare Student 2 vs Studen 3 : \t " + studenController2.CompareTo(studentEntity2, studentEntity3));

        System.out.println("Compare Student 1 vs Studen 3 : \t " + studenController3.CompareTo(studentEntity1, studentEntity3));


    }
}
